//
//  CustomCellWhatToDo.m
//  CustomTable
//
//  Created by Alex Muller on 3/15/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "CustomCellWhatToDo.h"


@implementation CustomCellWhatToDo

@synthesize back, moreInfo, imageView, confName;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {        
        //UIColor *shpeBlue = [UIColor colorWithRed:0 green:0.0588235 blue:0.3529412 alpha:1];
        
        back = [[UIButton alloc] init];
        [back setBackgroundImage:[UIImage imageNamed:@"close.png"] forState:UIControlStateNormal];
        moreInfo = [[UIButton alloc] init];
        [moreInfo setTitle:@"More Info.." forState:UIControlStateNormal];
        [self.contentView addSubview:back];
        imageView = [[UIImageView alloc] init];
        imageView.image = [UIImage imageNamed:@"noImage"];
        confName = [[UILabel alloc] init];
        confName.textAlignment = UITextAlignmentCenter;
        confName.font = [UIFont systemFontOfSize:24];
        confName.textColor = [UIColor grayColor];
        confName.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:moreInfo];
        [self.contentView addSubview:imageView];
        [self.contentView addSubview:confName];
        self.contentView.backgroundColor = [UIColor blackColor];
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    CGRect contentRect = self.contentView.bounds;
    CGFloat boundsX = contentRect.origin.x;
    CGRect frame;
    
    frame = CGRectMake(boundsX+265, 0, 44, 44);
    back.frame = frame;
    
    frame = CGRectMake(boundsX+200, 180, 90, 44);
    moreInfo.frame = frame;
    
    frame = CGRectMake(boundsX+20, 50, 120, 120);
    imageView.frame = frame;
    
    frame = CGRectMake(boundsX+10, 15, 260, 30);
    confName.frame = frame;


}


- (void)dealloc
{
    [super dealloc];
}

@end
